<?php /* Smarty version Smarty3-RC3, created on 2013-10-10 12:54:15
         compiled from ".\templates\rojmelEntry.tpl" */ ?>
<?php /*%%SmartyHeaderCode:159125256a3777a9ee3-61649577%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1e53126582407e8a3e26f2ad808f79015c3b5060' => 
    array (
      0 => '.\\templates\\rojmelEntry.tpl',
      1 => 1380267321,
    ),
  ),
  'nocache_hash' => '159125256a3777a9ee3-61649577',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_html_options')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_select_date.php';
?><?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<script type="text/javascript">
function checkPartyCombo()
{
	var party        = $('#party').val();
	var kaarigar     = $('#kaarigar').val();
	var bullionParty = $('#bullionParty').val();
	var bhatthiParty = $('#bhatthiParty').val();

	if((party == 1 && kaarigar == 1 && bullionParty == 1 && bhatthiParty == 1) || (party != 0 && kaarigar != 0) || (party != 0 && bullionParty != 0) || (party != 0 && bhatthiParty != 0) || (kaarigar != 0 && bullionParty != 0) || (kaarigar != 0 && bhatthiParty != 0) || (bullionParty != 0 && bhatthiParty != 0))
	{
		alert('Only One Party Select');
		return false;
	}
}
</script>
<form name="form1" action="" method="post" onsubmit="return checkPartyCombo();">
<input type="hidden" name="rojmelId" value="<?php echo $_smarty_tpl->getVariable('rojmel')->value['id'];?>
" />
<div class="contentDiv">
  <table align="center">
  <tr>
    <td>
      <?php echo $_smarty_tpl->getVariable('l_partySelect')->value;?>
 :
        <select name="party" id="party">
        <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('party')->value['partyId'],'output'=>$_smarty_tpl->getVariable('party')->value['partyName'],'selected'=>$_smarty_tpl->getVariable('vepaariPartyId')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td align="center">
      <?php echo $_smarty_tpl->getVariable('l_kaarigarName')->value;?>
 :
      <select name="kaarigar" id="kaarigar">
        <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('kaarigar')->value['id'],'output'=>$_smarty_tpl->getVariable('kaarigar')->value['name'],'selected'=>$_smarty_tpl->getVariable('kaarigarPartyId')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td colspan="5" >
      <?php echo $_smarty_tpl->getVariable('l_bullionpartySelect')->value;?>
 :
        <select name="bullionParty" id="bullionParty">
        <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('partyBullion')->value['partyId'],'output'=>$_smarty_tpl->getVariable('partyBullion')->value['bullionPartyName'],'selected'=>$_smarty_tpl->getVariable('bullionPartyId')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td>
      <?php echo $_smarty_tpl->getVariable('l_bhatthiParty')->value;?>
 :
      <select name="bhatthiParty" id="bhatthiParty">
        <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('bhatthiParty')->value['id'],'output'=>$_smarty_tpl->getVariable('bhatthiParty')->value['name'],'selected'=>$_smarty_tpl->getVariable('bhatthiPartyRojmelId')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select> 
    </td>

  </tr>
  <tr>
    <td align="right"><br/><br/><?php echo $_smarty_tpl->getVariable('l_date')->value;?>
 : </td>
    <td><br/><br/><?php echo smarty_function_html_select_date(array('prefix'=>"curDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'time'=>$_smarty_tpl->getVariable('rojmel')->value['date']),$_smarty_tpl->smarty,$_smarty_tpl);?>
</td>
  </tr>
  <tr>
    <td align="right"><?php echo $_smarty_tpl->getVariable('l_credit')->value;?>
 / <?php echo $_smarty_tpl->getVariable('l_debit')->value;?>
 : </td>
    <td>
      <select name="crdr">
        <option value="Dr"><?php echo $_smarty_tpl->getVariable('l_debit')->value;?>
</option>
        <option value="Cr"><?php echo $_smarty_tpl->getVariable('l_credit')->value;?>
</option>
      </select>
    </td>
  </tr>
  <tr>
    <td align="right"><?php echo $_smarty_tpl->getVariable('l_particulars')->value;?>
 : </td>
    <td><input type="text" name="particulars" value="<?php echo $_smarty_tpl->getVariable('rojmel')->value['particulars'];?>
" /></td>
  </tr>
  <tr>
    <td align="right"><?php echo $_smarty_tpl->getVariable('l_fine')->value;?>
 : </td>
    <td><input type="text" name="fine" value="<?php echo $_smarty_tpl->getVariable('rojmel')->value['fine'];?>
" REQUIRED /></td>
  </tr>
  <tr>
    <td align="right"><?php echo $_smarty_tpl->getVariable('l_amount')->value;?>
 : </td>
    <td><input type="text" name="amount" value="<?php echo $_smarty_tpl->getVariable('rojmel')->value['amount'];?>
" /></td>
  </tr>
  <tr>
    <td align="right">
      <input type="submit" name="submitBtn" value="<?php if (count($_smarty_tpl->getVariable('rojmel')->value)>0){?><?php echo $_smarty_tpl->getVariable('l_save')->value;?>
<?php }else{ ?><?php echo $_smarty_tpl->getVariable('l_add')->value;?>
<?php }?>" />
      <input type="submit" name="cancelBtn" value="<?php if (count($_smarty_tpl->getVariable('rojmel')->value)>0){?>Cancel<?php }else{ ?>Cancel<?php }?>" />
    </td>
  </tr>
  </table>
</div>
</form>
<script type="text/javascript">
<?php if (count($_smarty_tpl->getVariable('rojmel')->value)>0){?>
  for(var a=0 ; a < document.form1.crdr.length ; a++)
  {  
    if(document.form1.crdr[a].value == "<?php echo $_smarty_tpl->getVariable('rojmel')->value['CrDr'];?>
")
      document.form1.crdr[a].selected = true;
  }
<?php }?>
</script>
<?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>